package lab02.test22;

public class Test {
    public static void main(String[] args) {
        String result = "Hello World";
        char[] ca=result.toCharArray();
    for(int n=ca.length-1;n>=0;n--){
        System.out.print(ca[n]);}
        char tmp;
        for (int i = 0; i < result.length(); i++) {
            tmp = result.charAt(i);
            if (tmp >= 'A' && tmp <= 'Z') {
                tmp = (char) (tmp + 32);
                System.out.print(tmp);
            } else if (tmp >= 'a' && tmp <= 'z') {
                tmp = (char) (tmp - 32);
                System.out.print(tmp);
            }
        }

    }
}
//DROwOLLEH”DROwOLLEH”

